package cmarter.dev.chpt2.predicates;

import cmarter.dev.chpt2.interfaces.ApplePredicate;
import cmarter.dev.entities.Apple;

public class AppleWeightPredicate implements ApplePredicate {
	private int limit;
	
	public AppleWeightPredicate(int limit) {
		this.limit = limit;
	}
	
	@Override
	public boolean test(Apple apple) {
		return apple.getWeight() >= limit;
	}	
}